package cn.hengzhu.main_manager.utils;

import io.swagger.annotations.ApiModelProperty;

/**
 * 增删改AJax请求想要Json所对的类
 *   只关心是否成功及失败后的提示
 * @author Administrator
 *
 */
public class AjaxResult {

	//操作是否成功
	@ApiModelProperty("是否请求成功")
	private boolean success = true;//默认是成功
	
	//提示信息
	@ApiModelProperty("返回的消息，成功时默认返回‘操作成功’，可自定义")
	private String message = "操作成功!";

	public boolean isSuccess() {
		return success;
	}

	public void setSuccess(boolean success) {
		this.success = success;
	}

	public String getMessage() {
		return message;
	}

	public void setMessage(String message) {
		this.message = message;
	}


	//直接创建,认为是操作成功,并且提示信息"操作成功"
	public AjaxResult() {
		super();
	}

	//失败的,并且传入失败的提示信息
	public AjaxResult(String message) {
		this.success = false;
		this.message = message;
	}
	
   
	
	
	
	
	
}
